home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / contrib / changefont / dump.c next >
Encoding:
C/C++ Source or Header  |  1995-09-19  |  306 b   |  27 lines

  1. #include <stdio.h>
  2.  
  3.  
  4. void dobyte(int byte)
  5. {
  6.   int i;
  7.   int mask=128;
  8.   for(i=0;i<8;i++)
  9.   {
  10.     if(byte & mask) putchar('O');
  11.     else putchar(' ');
  12.     mask/=2;
  13.   }
  14. }
  15.  
  16. void main()
  17. {
  18.   int c;
  19.   while(!feof(stdin))
  20.   {
  21.     c=getchar();
  22.     if(feof(stdin)) continue;
  23.     dobyte(c);
  24.     putchar('\n');
  25.   }
  26. }
  27.